
<?php
 use_helper('Flash');  
   foreach($baners as $baner)
   {
        $name = $baner->getFilePath();
	    $ext = explode('.',$name);
		$ext = $ext[sizeof($ext)-1];
  if($ext=='swf')
  {
  $params = array ('id' => 'flash_movie', 'movie' => 'baner/'.$baner->getFilePath (), 'size' => $baner->getWidth().'x'.$baner->getHeight(), 'version' => '8', 'background_color' => '', 'params' => array ('wmode'=> 'transparent','allowScriptAccess' => 'sameDomain', 'quality' => 'high' ), 'create_proxy' => false );
					
  echo  '<ins class="thumbnail">'.flash_object ( 'nameflash'.$baner->getId(), $params ).'</ins>';
  }
  else 
  {
    echo '<ins class="thumbnail"><a target=_blank href="http://'.$baner->getUrl().'">'.image_tag('/uploads/baner/'.$baner->getFilePath(),'title="'.$baner->getTitle().'"').'</a></ins>';
  }
   }
  ?>